File histories from commit view #708
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently when the file history is requested,
git log
runs against the current branch. Thus if file history is requested for a file from a commit from another visible branch, the selected commit does not show up in the history. When the file was added in another branch and was not yet seen in the current branch, the history view is just empty.This PR makes the log run against the selected commit, which makes most sense to me.
Another approach would probably be to find a first parent reference containing current commit and run log against that, though to me it would be a bit counter-intuitive.